1. Field of the Invention
The present invention relates to an optical disk apparatus, and more specifically to memory control technology in an optical disk apparatus in which the minimum amount of data to be recorded is set.
2. Description of Related Art
When recording data onto an optical disk, recording data supplied from an external device such as a host device is temporarily stored in a buffer memory and the recording data stored in the buffer memory is then read out and supplied to an optical pickup. Here, because a DVD-RAM or the like has a sector format in which data is recorded for each ECC block (sixteen sectors), it is necessary to store recording data corresponding to sixteen sectors in a buffer memory.
Japanese Patent Laid-Open Publication No. Hei 7-296507 describes technology in which, when the buffer memory includes recording data having an amount which is less than the recording data unit in an optical magnetic disk, dummy data is added to thereby satisfy the unit data amount of the recording data.
In DVD-RAM drives, similar technology is known in which, when the buffer memory includes recording data having an amount which is less than the data amount corresponding to sixteen sectors, data which is already recorded in a DVD-RAM is read out and stored in the buffer memory, thereby satisfying the data amount corresponding to sixteen sectors.
FIGS. 7 and 8 schematically show a conventional method of storing recording data in a buffer memory 100. Here, it is assumed that the capacity of the buffer memory 100 corresponds to seven ECC blocks and that, with the length of data from a host device being 0X10, a plurality of sequential write commands are sequentially supplied from the host device with regard to the logical block address LBA of the buffer memory, starting from 0X1000E (hexadecimal representation). A controller of the optical disk apparatus, receiving a write command from the host device, sequentially stores the recording data which is received, in the logical block addresses 0X1000E to 0X1006D of the buffer memory 100. Then, when the controller sequentially receives the next write command from the host device, the buffer memory includes only a free space at the logical block addresses from 0X1006E to 0X1006F, which is not sufficient for storing the data length of 0X10. Accordingly, it is determined at this time that the buffer memory is FULL, and data reception from the host device is not performed. Consequently, as shown in FIG. 7, the buffer memory includes a free region from 0X10000 to 0X1000D (the region a) and a free region from 0X1006E to 0X1006F (the region b), in which the amount of the recording data stored would be below the data amount corresponding to sixteen sectors. With this state, it is not possible to record the recording data onto a DVD-RAM.
Accordingly, the controller, in order to fill the regions a and b, accesses addresses of a DVD-RAM corresponding to the respective regions, reads out data existing in the corresponding addresses, and stores the data which is read out into the buffer memory 100. FIG. 8 shows a state of the buffer memory 100 which is filled using the data which is read from the DVD-RAM. In this manner, the recording data corresponding to sixteen sectors is stored in the buffer memory 100, and the controller reads out the recording data in the units of sixteen sectors and supplies the data which is read to the optical pickup for recording the data onto the DVD-RAM.
With the above structure, however, each time the buffer memory 100 is determined to be FULL, it is necessary to read out data from a DVD-RAM so as to fill the buffer memory, and more specifically, it is necessary to perform the data read out operation twice so as to fill the top region and the end region of the buffer memory 100. This results in a problem that considerable time is required from when a write command is received until when recording of all the data is completed. In particular, with a recent trend of the increased capacity of the buffer memory 100, as the capacity is increased, the start address and the end address are located further apart and the addresses of the DVD-RAM which are read out are also further apart, resulting in an increase in time for completion of recording.